#!/usr/bin/expect

set timeout 5
spawn ssh -l tsunade web1
expect "\$ "
send "sudo sh start_actors.sh\n"
expect "tsunade: "
send "konoha\n"
expect "\$ "
send "exit\n"

set timeout 5
spawn ssh -l tsunade web2
expect "\$ "
send "sudo sh start_actors.sh\n"
expect "tsunade: "
send "konoha\n"
expect "\$ "
send "exit\n"

set timeout 5
spawn ssh -l tsunade db1
expect "\$ "
send "sudo sh start_actors.sh\n"
expect "tsunade: "
send "konoha\n"
expect "\$ "
send "exit\n"

set timeout 5
spawn ssh -l tsunade diag
expect "\$ "
send "sudo sh start_actors.sh\n"
expect "Password:"
send "konoha\n"
expect "\$ "
send "exit\n"

interact
